package com.micangcaihang.micang.entity;

import com.micangcaihang.common.utils.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <pre>
 *     author : Fandy
 *     e-mail : fandayongfly@gmail.com
 *     time   : 2017/08/01
 *     update : 2017/08/01
 *     desc   : 担保人信息实体类
 *     version: 1.0
 * </pre>
 */

public class FTaskBondsmanInfoEntity implements Serializable {
    /**
     * customer_id : 1182
     * customer_name : 升
     * marriage_status : null
     * co_owner_code :
     * co_owner_percent :
     * certificate_type : null
     * certificate_number :
     * peason_credit : null
     * peason_crediless : null
     * peason_enforced : null
     * mobile_phone :
     * customer_sex : null
     * relationship_type : 1
     * customer_type : 2
     * relationship_id : 1037
     * ensure_object : null
     * ensure_object_other : null
     * ensure_card_type : null
     * ensuer_card_no : null
     * mates : [{"customer_id":1112,"customer_name":"借款人现任配偶","certificate_type":1,"certificate_number":"130633198507190014","peason_credit":2,"peason_crediless":1,"peason_enforced":1,"mobile_phone":"13699208101","customer_sex":1,"death_certificate_type":null,"relationship_type":1,"customer_type":6,"relationship_id":1500012388}]
     */

    private String customer_id;
    private String customer_name;
    private String marriage_status;
    private String co_owner_code;
    private String co_owner_percent;
    private String certificate_type;
    private String certificate_number;
    private String peason_credit;
    private String peason_crediless;
    private String peason_enforced;
    private String mobile_phone;
    private String customer_sex;
    private String relationship_type;
    private String customer_type;
    private String relationship_id;
    private String ensure_object;
    private String ensure_object_other;
    private String ensure_card_type;
    private String ensuer_card_no;
    private String query_time;
    private String age;
    private List<MatesEntity> mates;
    private ChooseListBean choose_list;

    public boolean checkEmpty() {
        if (StringUtils.isEmpty(customer_name)) {
            return true;
        } else {
            return false;
        }
    }

    public FTaskBondsmanInfoEntity() {
        customer_id = "";
        customer_name = "";
        marriage_status = "";
        co_owner_code = "";
        co_owner_percent = "";
        certificate_type = "";
        certificate_number = "";
        peason_credit = "";
        peason_crediless = "";
        peason_enforced = "";
        mobile_phone = "";
        customer_sex = "";
        relationship_type = "";
        customer_type = "";
        relationship_id = "";
        ensure_object = "";
        ensure_object_other = "";
        ensure_card_type = "";
        ensuer_card_no = "";
        query_time = "";
        age = "";
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getQuery_time() {
        return query_time == null || "0".equals(query_time) ? "" : query_time;
    }

    public void setQuery_time(String query_time) {
        this.query_time = query_time;
    }

    public ChooseListBean getChoose_list() {
        ChooseListBean chooseListBean = new ChooseListBean();
        if (choose_list == null) {
            setChoose_list(chooseListBean);
        }
        return choose_list;
    }

    public void setChoose_list(ChooseListBean choose_list) {
        this.choose_list = choose_list;
    }

    public String getCustomer_id() {
        return StringUtils.isEmpty(customer_id) ? "" : customer_id;
    }

    public void setCustomer_id(String customer_id) {
        this.customer_id = customer_id;
    }

    public String getCustomer_name() {
        return StringUtils.isEmpty(customer_name) ? "" : customer_name;
    }

    public void setCustomer_name(String customer_name) {
        this.customer_name = customer_name;
    }

    public String getMarriage_status() {
        return StringUtils.isEmpty(marriage_status) ? "" : marriage_status;
    }

    public void setMarriage_status(String marriage_status) {
        this.marriage_status = marriage_status;
    }

    public String getCo_owner_code() {
        return StringUtils.isEmpty(co_owner_code) ? "" : co_owner_code;
    }

    public void setCo_owner_code(String co_owner_code) {
        this.co_owner_code = co_owner_code;
    }

    public String getCo_owner_percent() {
        return StringUtils.isEmpty(co_owner_percent) ? "" : co_owner_percent;
    }

    public void setCo_owner_percent(String co_owner_percent) {
        this.co_owner_percent = co_owner_percent;
    }

    public String getCertificate_type() {
        return StringUtils.isEmpty(certificate_type) ? "" : certificate_type;
    }

    public void setCertificate_type(String certificate_type) {
        this.certificate_type = certificate_type;
    }

    public String getCertificate_number() {
        return StringUtils.isEmpty(certificate_number) ? "" : certificate_number;
    }

    public void setCertificate_number(String certificate_number) {
        this.certificate_number = certificate_number;
    }

    public String getPeason_credit() {
        return StringUtils.isEmpty(peason_credit) ? "" : peason_credit;
    }

    public void setPeason_credit(String peason_credit) {
        this.peason_credit = peason_credit;
    }

    public String getPeason_crediless() {
        return StringUtils.isEmpty(peason_crediless) ? "" : peason_crediless;
    }

    public void setPeason_crediless(String peason_crediless) {
        this.peason_crediless = peason_crediless;
    }

    public String getPeason_enforced() {
        return StringUtils.isEmpty(peason_enforced) ? "" : peason_enforced;
    }

    public void setPeason_enforced(String peason_enforced) {
        this.peason_enforced = peason_enforced;
    }

    public String getMobile_phone() {
        return StringUtils.isEmpty(mobile_phone) ? "" : mobile_phone;
    }

    public void setMobile_phone(String mobile_phone) {
        this.mobile_phone = mobile_phone;
    }

    public String getCustomer_sex() {
        return StringUtils.isEmpty(customer_sex) ? "" : customer_sex;
    }

    public void setCustomer_sex(String customer_sex) {
        this.customer_sex = customer_sex;
    }

    public String getRelationship_type() {
        return StringUtils.isEmpty(relationship_type) ? "" : relationship_type;
    }

    public void setRelationship_type(String relationship_type) {
        this.relationship_type = relationship_type;
    }

    public String getCustomer_type() {
        return StringUtils.isEmpty(customer_type) ? "" : customer_type;
    }

    public void setCustomer_type(String customer_type) {
        this.customer_type = customer_type;
    }

    public String getRelationship_id() {
        return StringUtils.isEmpty(relationship_id) ? "" : relationship_id;
    }

    public void setRelationship_id(String relationship_id) {
        this.relationship_id = relationship_id;
    }

    public String getEnsure_object() {
        return StringUtils.isEmpty(ensure_object) ? "" : ensure_object;
    }

    public void setEnsure_object(String ensure_object) {
        this.ensure_object = ensure_object;
    }

    public String getEnsure_object_other() {
        return StringUtils.isEmpty(ensure_object_other) ? "" : ensure_object_other;
    }

    public void setEnsure_object_other(String ensure_object_other) {
        this.ensure_object_other = ensure_object_other;
    }

    public String getEnsure_card_type() {
        return StringUtils.isEmpty(ensure_card_type) ? "" : ensure_card_type;
    }

    public void setEnsure_card_type(String ensure_card_type) {
        this.ensure_card_type = ensure_card_type;
    }

    public String getEnsuer_card_no() {
        return StringUtils.isEmpty(ensuer_card_no) ? "" : ensuer_card_no;
    }

    public void setEnsuer_card_no(String ensuer_card_no) {
        this.ensuer_card_no = ensuer_card_no;
    }

    public List<MatesEntity> getMates() {
        List<MatesEntity> matesEntities = new ArrayList<>();
        if (mates == null) {
            setMates(matesEntities);
        }
        return mates;
    }

    public void setMates(List<MatesEntity> mates) {
        this.mates = mates;
    }

    public static class ChooseListBean implements Serializable {

        /**
         * certificate_type : 身份证
         * peason_credit : 正常
         * peason_crediless : 是
         * peason_enforced : 是
         * marriage_status : 再婚
         */
        private String customer_sex;//性别
        private String certificate_type;//证件类型
        private String marriage_status;//婚姻
        private String customer_nationality;////国籍
        private String resident_province;//省
        private String resident_city;//市
        private String resident_county;//区
        private String peason_credit;//征信状况
        private String peason_crediless;// //是否失信
        private String peason_enforced;// //是否被执行
        private String asset_survey;// ////资产调查
        private String vocation_type;// ////行业类别
        private String occupation_type;// ////职业类别
        private String customer_type;//与借款人关系
        private String ensure_object;                           //担保资产
        private String ensure_card_type;                       //担保证件名称
        private String relationship_type;                      //与借款人关系

        public String getRelationship_type() {
            return relationship_type;
        }

        public void setRelationship_type(String relationship_type) {
            this.relationship_type = relationship_type;
        }

        public String getEnsure_object() {
            return ensure_object;
        }

        public void setEnsure_object(String ensure_object) {
            this.ensure_object = ensure_object;
        }

        public String getEnsure_card_type() {
            return ensure_card_type;
        }

        public void setEnsure_card_type(String ensure_card_type) {
            this.ensure_card_type = ensure_card_type;
        }

        public String getCustomer_type() {
            return StringUtils.isEmpty(customer_type) ? "" : customer_type;
        }

        public void setCustomer_type(String customer_type) {
            this.customer_type = customer_type;
        }

        public String getCertificate_type() {
            return StringUtils.isEmpty(certificate_type) ? "" : certificate_type;
        }

        public void setCertificate_type(String certificate_type) {
            this.certificate_type = certificate_type;
        }

        public String getCustomer_sex() {
            return StringUtils.isEmpty(customer_sex) ? "" : customer_sex;
        }

        public void setCustomer_sex(String customer_sex) {
            this.customer_sex = customer_sex;
        }

        public String getCustomer_nationality() {
            return StringUtils.isEmpty(customer_nationality) ? "" : customer_nationality;
        }

        public void setCustomer_nationality(String customer_nationality) {
            this.customer_nationality = customer_nationality;
        }

        public String getResident_province() {
            return StringUtils.isEmpty(resident_province) ? "" : resident_province;
        }

        public void setResident_province(String resident_province) {
            this.resident_province = resident_province;
        }

        public String getResident_city() {
            return StringUtils.isEmpty(resident_city) ? "" : resident_city;
        }

        public void setResident_city(String resident_city) {
            this.resident_city = resident_city;
        }

        public String getResident_county() {
            return StringUtils.isEmpty(resident_county) ? "" : resident_county;
        }

        public void setResident_county(String resident_county) {
            this.resident_county = resident_county;
        }

        public String getAsset_survey() {
            return StringUtils.isEmpty(asset_survey) ? "" : asset_survey;
        }

        public void setAsset_survey(String asset_survey) {
            this.asset_survey = asset_survey;
        }

        public String getVocation_type() {
            return StringUtils.isEmpty(vocation_type) ? "" : vocation_type;
        }

        public void setVocation_type(String vocation_type) {
            this.vocation_type = vocation_type;
        }

        public String getOccupation_type() {
            return StringUtils.isEmpty(occupation_type) ? "" : occupation_type;
        }

        public void setOccupation_type(String occupation_type) {
            this.occupation_type = occupation_type;
        }

        public String getPeason_credit() {
            return StringUtils.isEmpty(peason_credit) ? "" : peason_credit;
        }

        public void setPeason_credit(String peason_credit) {
            this.peason_credit = peason_credit;
        }

        public String getPeason_crediless() {
            return StringUtils.isEmpty(peason_crediless) ? "" : peason_crediless;
        }

        public void setPeason_crediless(String peason_crediless) {
            this.peason_crediless = peason_crediless;
        }

        public String getPeason_enforced() {
            return StringUtils.isEmpty(peason_enforced) ? "" : peason_enforced;
        }

        public void setPeason_enforced(String peason_enforced) {
            this.peason_enforced = peason_enforced;
        }

        public String getMarriage_status() {
            return StringUtils.isEmpty(marriage_status) ? "" : marriage_status;
        }

        public void setMarriage_status(String marriage_status) {
            this.marriage_status = marriage_status;
        }
    }

    @Override
    public String toString() {
        return "FTaskBondsmanInfoEntity{" +
                "customer_id='" + customer_id + '\'' +
                ", customer_name='" + customer_name + '\'' +
                ", marriage_status='" + marriage_status + '\'' +
                ", co_owner_code='" + co_owner_code + '\'' +
                ", co_owner_percent='" + co_owner_percent + '\'' +
                ", certificate_type='" + certificate_type + '\'' +
                ", certificate_number='" + certificate_number + '\'' +
                ", peason_credit='" + peason_credit + '\'' +
                ", peason_crediless='" + peason_crediless + '\'' +
                ", peason_enforced='" + peason_enforced + '\'' +
                ", mobile_phone='" + mobile_phone + '\'' +
                ", customer_sex='" + customer_sex + '\'' +
                ", relationship_type='" + relationship_type + '\'' +
                ", customer_type='" + customer_type + '\'' +
                ", relationship_id='" + relationship_id + '\'' +
                ", ensure_object='" + ensure_object + '\'' +
                ", ensure_object_other='" + ensure_object_other + '\'' +
                ", ensure_card_type='" + ensure_card_type + '\'' +
                ", ensuer_card_no='" + ensuer_card_no + '\'' +
                ", query_time='" + query_time + '\'' +
                ", age='" + age + '\'' +
                '}';
    }
}
